package com.example.yunJie.digitalSentry.service.impl;

import com.example.yunJie.digitalSentry.entity.ShiftPeriodEntity;
import com.example.yunJie.digitalSentry.mapper.one.ShiftPeriodMapper;
import com.example.yunJie.digitalSentry.service.ShiftPeriodService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service
@RequiredArgsConstructor
public class ShiftPeriodServiceImpl implements ShiftPeriodService {

    private final ShiftPeriodMapper shiftPeriodMapper;

    @Override
    public int insert(ShiftPeriodEntity shiftPeriodEntity) {
        return shiftPeriodMapper.insert(shiftPeriodEntity);
    }

    @Override
    public int update(ShiftPeriodEntity shiftPeriodEntity) {
        return shiftPeriodMapper.update(shiftPeriodEntity);
    }

    @Override
    public int deleteById(Serializable id) {
        return shiftPeriodMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(List<Integer> idList) {
        return shiftPeriodMapper.deleteIdList(idList);
    }

    @Override
    public int deleteByShiftId(String shiftId) {
        return shiftPeriodMapper.deleteByShiftId(shiftId);
    }

    @Override
    public ShiftPeriodEntity findId(Serializable id) {
        return shiftPeriodMapper.findId(id);
    }

    @Override
    public ShiftPeriodEntity findByShiftId(String shiftId) {
        return shiftPeriodMapper.findByShiftId(shiftId);
    }

    @Override
    public ShiftPeriodEntity find(ShiftPeriodEntity shiftPeriodEntity) {
        return shiftPeriodMapper.find(shiftPeriodEntity);
    }

    @Override
    public List<ShiftPeriodEntity> findAll(ShiftPeriodEntity shiftPeriodEntity) {
        return shiftPeriodMapper.findAll(shiftPeriodEntity);
    }
}
